module.exports = {
    name: "RightGroup",
    viewName: 'ViewRightGroup',
    primaryKey: "RightGroupId",
    dataRightDataSource: getDataRightDataSource(),
    operationRightDataSource: getOperationRightDataSource(),
    menuTreeNodesDataSource: getMenuTreeNodesDataSource(),
    properties: getProperties(),
}

function getProperties() {
    return [
        getProperty("RightGroupId", "RightGroupId"),
        getProperty("Name", "名称"),
        getProperty("DataRightName", "数据权限"),
        getProperty("OperationRightName", "操作权限"),
        getProperty("Remark", "备注"),
        getProperty("CreateDate", "创建时间")
    ]
}

function getProperty(name, label) { return { name, label } }

function getDataRightDataSource() {
    return [{ value: 0, text: "个人" }, { value: 1, text: "全部" }]
}

function getOperationRightDataSource() {
    return [{ value: 0, text: "只读" }, { value: 1, text: "读写" }]
}


function getMenuTreeNodesDataSource() {
    return {
        stateName: "getMenuTreeNodes",
        serviceName: "MenuService",
        actionName: "getMenuTreeNodes",
        isRefresh: true
    }
}
